using DG.Tweening;
using UnityEngine;

public class AutoAnimRotate : MonoBehaviour
{
    private RingMesh[] _ringMesh;
    private int _count;
    public float m_minDuration = 0.7f;
    public float m_maxDuration = 1.5f;
    public float m_minDelay = 0f;
    public float m_maxDelay = 0.1f;
    
    void Start()
    {
        _ringMesh = transform.GetComponentsInChildren<RingMesh>();
        _count = _ringMesh.Length;
        for (var i = 0; i < _count; i++)
        {
            var duration = Random.Range(m_minDuration, m_maxDuration);
            var delay = Random.Range(m_minDelay, m_maxDelay);
            _ringMesh[i].DoRotate(duration, delay);
        }
    }

}
